import 'package:get/get.dart';

import '../bindings/home_binding.dart';
import '../bindings/login_binding.dart';
import '../bindings/upload_binding.dart';
import '../bindings/download_binding.dart';
import '../bindings/settings_binding.dart';
import '../bindings/share_binding.dart';
import '../bindings/search_binding.dart';
import '../bindings/recycle_binding.dart';

import '../../pages/home/home_page.dart';
import '../../pages/auth/login_page.dart';
import '../../pages/upload/upload_page.dart';
import '../../pages/download/download_page.dart';
import '../../pages/settings/settings_page.dart';
import '../../pages/settings/storage_stats_page.dart';
import '../../pages/settings/theme_settings_page.dart';
import '../../pages/settings/language_settings_page.dart';
import '../../pages/settings/cloud_settings_page.dart';
import '../../pages/settings/about_page.dart';
import '../../pages/share/export_page.dart';
import '../../pages/share/import_page.dart';
import '../../pages/search/search_page.dart';
import '../../pages/recycle/recycle_bin_page.dart';

import 'app_routes.dart';

class AppPages {
  AppPages._();

  static const INITIAL = Routes.HOME;

  static final routes = [
    GetPage(
      name: _Paths.HOME,
      page: () => HomePage(),
      binding: HomeBinding(),
    ),
    GetPage(
      name: _Paths.LOGIN,
      page: () => LoginPage(),
      binding: LoginBinding(),
    ),
    GetPage(
      name: _Paths.UPLOAD,
      page: () => UploadPage(),
      binding: UploadBinding(),
    ),
    GetPage(
      name: _Paths.DOWNLOAD,
      page: () => DownloadPage(),
      binding: DownloadBinding(),
    ),
    GetPage(
      name: _Paths.SETTINGS,
      page: () => SettingsPage(),
      binding: SettingsBinding(),
    ),
    GetPage(
      name: _Paths.SHARE,
      page: () => ExportPage(),
      binding: ShareBinding(),
    ),
    GetPage(
      name: _Paths.IMPORT,
      page: () => ImportPage(),
      binding: ShareBinding(),
    ),
    GetPage(
      name: _Paths.SEARCH,
      page: () => SearchPage(),
      binding: SearchBinding(),
    ),
    GetPage(
      name: _Paths.RECYCLE_BIN,
      page: () => RecycleBinPage(),
      binding: RecycleBinding(),
    ),
    GetPage(
      name: _Paths.STORAGE_STATS,
      page: () => StorageStatsPage(),
      binding: SettingsBinding(),
    ),
    GetPage(
      name: _Paths.THEME_SETTINGS,
      page: () => ThemeSettingsPage(),
      binding: SettingsBinding(),
    ),
    GetPage(
      name: _Paths.LANGUAGE_SETTINGS,
      page: () => LanguageSettingsPage(),
      binding: SettingsBinding(),
    ),
    GetPage(
      name: _Paths.CLOUD_SETTINGS,
      page: () => CloudSettingsPage(),
      binding: SettingsBinding(),
    ),
    GetPage(
      name: _Paths.ABOUT,
      page: () => AboutPage(),
      binding: SettingsBinding(),
    ),
  ];
}

abstract class _Paths {
  _Paths._();
  
  static const HOME = '/home';
  static const LOGIN = '/login';
  static const UPLOAD = '/upload';
  static const DOWNLOAD = '/download';
  static const SETTINGS = '/settings';
  static const SHARE = '/share';
  static const IMPORT = '/import';
  static const SEARCH = '/search';
  static const RECYCLE_BIN = '/recycle-bin';
  static const STORAGE_STATS = '/storage-stats';
  static const THEME_SETTINGS = '/theme-settings';
  static const LANGUAGE_SETTINGS = '/language-settings';
  static const CLOUD_SETTINGS = '/cloud-settings';
  static const ABOUT = '/about';
}